function Map(){
    this.elements = new Array();

    // 获取大小
    this.size = function() {
        return this.elements.length;
    };

    // 判断元素是否为空
    this.isEmpty = function() {
        return this.elements.length > 0 ? false : true;
    };

    /*添加*/
    this.put = function(_key, _value) {
        this.elements.push({key: _key, value: _value});
    };

    // 移除
    this.remove = function(_key) {
        if(!this.isEmpty()) {
            for(var i = 0; i < this.elements.length; i ++) {
                if(this.elements[i].key == _key){
                    console.log(this.elements[i].key);
                    this.elements.splice(i, 1);
                }
            }
        } else {
            console.log('this empty!');
        }
    };

    // 获取
    this.get = function(_key) {
        try {
            for(var i = 0; i < this.elements.length; i ++) {
                if(this.elements[i].key === _key) {
                    return this.elements[i].value;
                }
            }
        } catch(e) {
            console.log(e);
            return null;
        }
    };
};